<script>
	$(document).ready(function(){
		$("#category_edit_form").validate({
			rules: {
				"category[name]": {
					required: true
				},
				"category[adding_price]": {
					required: true,
				}
			} 
		});	
	});
</script>
<div id="editCategoryForm">
	<form class="form-horizontal" id="category_edit_form" action="<?php echo url_for('@category_edit') ?>" method="post" enctype="multipart/form-data">
		<div><input type="hidden" name="category[id]" id="id" value="<?php echo (isset($category_id)) ? $category_id : ''?>" ></div>
		<div class="form-row row-fluid">
		 	<div class="span8">
		     	<div class="row-fluid">
		         	<?php echo $category_form['name']->renderLabel(null, array("class"=>"form-label span3"));  ?>
		         	<div class="span8 controls">
		         		<?php echo $category_form['name']->render(array("id" => "name"));  ?>
		         	</div>
		     	</div>
		 	</div>
		</div>
		<div class="form-row row-fluid">
		 	<div class="span8">
		     	<div class="row-fluid">
		         	<?php echo $category_form['parent_id']->renderLabel(null, array("class"=>"form-label span3"));  ?>
		         	<div class="span8 controls">
		         		<?php echo $category_form['parent_id']->render(array("id" => "parent_id"));  ?>
		         	</div>
		     	</div>
		 	</div>
		</div>
		<div class="form-row row-fluid">
		 	<div class="span8">
		     	<div class="row-fluid">
		         	<?php echo $category_form['description']->renderLabel(null, array("class"=>"form-label span3"));  ?>
		         	<div class="span8 controls">
		         		<?php echo $category_form['description']->render(array("id" => "description"));  ?>
		         	</div>
		     	</div>
		 	</div>
		</div>
		<div class="form-row row-fluid">
		 	<div class="span8">
		     	<div class="row-fluid">
		         	<?php echo $category_form['image']->renderLabel(null, array("class"=>"form-label span3"));  ?>
		         	<div class="span8 controls">
		         		<?php echo $category_form['image']->render(array("id" => "image"));  ?>
		         	</div>
		     	</div>
		 	</div>
		</div>
		<div class="form-row row-fluid">
		 	<div class="span8">
		     	<div class="row-fluid">
		         	<?php echo $category_form['href']->renderLabel(null, array("class"=>"form-label span3"));  ?>
		         	<div class="span8 controls">
		         		<?php echo $category_form['href']->render(array("id" => "href"));  ?>
		         	</div>
		     	</div>
			</div>
		</div>
	    <div class="form-row row-fluid">
	        <div class="span8">
	            <div class="row-fluid">
	                <?php echo $category_form['is_active']->renderLabel(null, array("class"=>"form-label span3"));  ?>
	                <div class="span8 controls">
	                 	<?php echo $category_form['is_active']->render(array("id" => "is_active"));  ?>
	                </div>
	            </div>
	        </div>
	    </div>
	    <div class="form-row row-fluid">                              
	        <div class="span12">
	            <div class="row-fluid">
	                <div class="form-actions">
	                 	<div class="span3"></div>
	                 	<div class="span9 controls">
							<button type="submit" class="btn marginR10" name="create" value="Create" >Lưu</button>
	                     	<button class="btn btn-danger">Làm lại</button>
	                 	</div>
	                </div>
	            </div>
	         </div>
	    </div>
	</form>
</div>